import Koa from 'koa'
import bodyParser from 'koa-bodyparser'
import koaCors from 'koa-cors'
import { sync } from './db/index.js'
import router from './router/index.js'

const app = new Koa();
sync()

app.use(koaCors())
app.use(bodyParser())

app.use(router)


app.listen(3000)